<?php
$allowedHots = array(
    '127.0.0.1',
    '91.196.97.210',
    '77.120.108.132'
);

if (!in_array($_SERVER['REMOTE_ADDR'], $allowedHots))
{
    header('HTTP/1.1 403 Forbidden');
    die('Your IP is not allowed');
}

require_once dirname(__FILE__) . '/app/class.api.php';
require_once dirname(__FILE__) . '/app/class.template.php';
require_once dirname(__FILE__) . '/app/class.message.php';
require_once dirname(__FILE__) . '/app/class.mailer.php';
require_once dirname(__FILE__) . '/app/class.queue.php';

$api = new API();

$api->cmd();

$result = $api->getResult();

echo serialize($result);
